package com.exoweb.games.hexagone.business
{
    import com.exoweb.common.business.CasualGameService;
    import com.exoweb.games.hexagone.model.HexModelLocator;
    import com.exoweb.games.hexagone.Config;

    public class HexService extends CasualGameService
    {
        private static var instance:HexService;

        public static function getInstance():HexService
        {
            if(instance == null)
            {
                instance = new HexService(new SingletonEnforcer());
            }
            return instance;
        }

        public function HexService(enforcer:SingletonEnforcer)
        {
            super();
            this.hasScore = true;
            this.remoteObject.destination = Config.destination;
            this.model = HexModelLocator.getInstance();
        }
    }
}

// The private class
class SingletonEnforcer {};
